<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<script src="js/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/index.css">
<link href="img/sd.ico" type="images/x-icon" rel="shortcut icon" />
<title>PL博客</title>

</head>
<body style="overflow-y: hidden">
	<!-- 导航 start -->
	<div id="nav">

		<!-- 图标 -->
		<div id="logo">
			<img src="img/logo.png" alt="logo" width="180" />
			<div class="operBtn">
				<a href="login.jsp"><button class="login btn btn-primary" style="margin-right:34px;width:75px;">登录</button></a>
				<a href="register.jsp"><button class="register btn btn-default" style="width:75px">注册</button></a>
			</div>
			<div id="username">
				
			</div>
			<h1><a href="#">PL博客</a></h1>
			<span>编程改变世界，智能创造未来</span>
		</div>

		<!-- 菜单列表 -->
		<div id="menu">
			<ul>
				<li class="menu_li current_page_item"><a class="article" href="article.jsp" target="iframe">文章列表</a></li>
				<li class="menu_li"><a class="home" href="edit/index.html" target="iframe">发表文章</a></li>
				<li class="menu_li userinfo"><a class="aboutUs" href="articleManager.html" target="iframe">个人中心</a></li>
			</ul>
		</div>
				
		<!-- Text 标语-->
		<section id="text">
			<div class="inner">
				<p>
					<strong>PL博客:</strong>在这里你可以畅所欲言，发表你的见解。<a href="#">以梦为马,不负韶华!</a><br>
					&copy; 2017 吴纯玲 谢裕聪.
				</p>
			</div>
		</section>
	</div>
	<!-- 导航 end -->
	<!-- 内联框架iframe  -->
	<iframe name="iframe" id="iframe" src="article.jsp" frameborder="0" scrolling="auto"></iframe>
</body>
<script src="js/index.js"></script>
<script type="text/javascript">
//解析url
function getQueryStringArgs(){
  var qs = (location.search.length>0?location.search.substring(1):"");
  var args = {};
  var items = qs.length?qs.split("&"):[];
  var item = null;
  var name = null;
  var value = null;
  len = items.length;
  for (var i = 0; i < len; i++) {
    item = items[i].split("=");
    name = decodeURIComponent(item[0]);
    value = decodeURIComponent(item[1]);
    if (name.length) {
      args[name] = value;
    }
  }
  return args;
}
var args = getQueryStringArgs();
if(typeof args["username"]!="undefined" && sessionStorage.username!="undefined"){
	$(".operBtn").css({"display":"none"});
	$("#username").css({"display":"block"});
	$("#username").text(sessionStorage.username);
}else{
	$(".operBtn").css({"display":"block"});
	$("#username").css({"display":"none"});
}
</script>
</html>